﻿$black: #000;
$darkest-gray: #272930;
$dark-gray: #4e4e5c;
$gray: #75758a;
$light-gray: #9c9cb8;
$lighter-gray: #c9d4f6;
$lightest-gray: #e3eafa;
$white: #fff;
$green: #82c427;
$blue: #3da0ea;
$purple: #932ab6;
$font: 'Lato', sans-serif;
$fontweight: 300;
$font-bold: 'Lato', sans-serif;
$fontweight-bold: 700;
$size-normal: 14px;

#sales-tool * {
    box-sizing: border-box;
    color: $lighter-gray;
    margin: 0;
    padding: 0;
}

#sales-tool {
    width: 100%;
    min-width: 600px;
    background-color: $darkest-gray;
    border-bottom: 4px solid $green;
    font-family: $font;
    font-weight: $fontweight;
    font-size: $size-normal;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: $lighter-gray;

    h1 {
        color: $lighter-gray;
        font-size: 24px;
        font-weight: $fontweight;
        line-height: 50px;
        border-bottom: solid 1px $dark-gray;
        margin: 0;
        padding: 0 0 0 10px;
    }

    h2 {
        color: $lighter-gray;
        font-size: 14px;
        font-family: $font-bold;
        font-weight: $fontweight-bold;
        line-height: 30px;
        text-transform: uppercase;
        margin: 0;
        padding: 0;
    }

    p {
        margin: 0;
    }

    strong {
        font-family: $font-bold;
        font-weight: $fontweight-bold;
    }

    small {
        font-size: 12px;
        color: $light-gray;
    }

    a {
        color: $lighter-gray;
        text-decoration: none;
    }

    li {
        list-style: none;
    }

    table {
        border-collapse: collapse;
        width: 100%;
    }

    th, td {
        padding: 2px 10px;
        margin: 0;
        border: none;
        background-color: transparent;
    }

    th {
        font-weight: $fontweight;
        color: $light-gray;
        text-align: left;
        border-bottom: solid 1px $dark-gray;
    }
    /* Form */
    label {
        color: $light-gray;
    }

    input[type="text"] {
        border: none;
        padding: 0 8px;
        font-family: $font;
        font-weight: $fontweight;
        font-size: $size-normal;
        color: $lighter-gray;
        background-color: $dark-gray;
        height: 34px;
        width: 200px;
        line-height: 34px;
        border-radius: 0;

        &::-webkit-input-placeholder {
            color: $light-gray;
            font-family: $font;
            font-weight: $fontweight;
        }

        &:-moz-placeholder {
            color: $light-gray;
            font-family: $font;
            font-weight: $fontweight;
        }

        &::-moz-placeholder {
            color: $light-gray;
            font-family: $font;
            font-weight: $fontweight;
        }

        &:-ms-input-placeholder {
            color: $light-gray;
            font-family: $font;
            font-weight: $fontweight;
        }
    }

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .sales-tool-form-group {
        position: relative;
        display: table;
        border-collapse: separate;
        padding: 8px 0;

        input {
            display: table-cell;
        }

        .sales-tool-search-button {
            display: table-cell;
            cursor: pointer;
            padding: 16px;
            border: solid 1px $dark-gray;
            background: top 8px right 7px no-repeat url('');
        }

        input + .sales-tool-button {
            position: absolute;
            z-index: 99991;
            top: 8px;
            right: 30px;
            border: none;
            background-color: transparent;
        }
    }
    /* Helper classes */
    .sales-tool-text-right {
        text-align: right;

        .sales-tool-button {
            margin-left: 10px;
        }
    }

    .sales-tool-pull-left {
        float: left;
    }

    .sales-tool-pull-right {
        float: right;
    }

    .sales-tool-nowrap {
        white-space: nowrap;
    }

    .sales-tool-divider {
        border-bottom: solid 1px $dark-gray;
        clear: both;
    }

    .sales-tool-divider-clear {
        border-bottom: solid 1px $gray;
        clear: both;
    }

    .sales-tool-margin {
        margin: 10px;
    }

    .sales-tool-top-margin {
        margin-top: 6px;
    }
    /* Buttons and dropdowns */
    .sales-tool-button {
        display: inline-block;
        padding: 8px 10px;
        margin-bottom: 0;
        color: $lighter-gray;
        font-family: $font;
        font-weight: $fontweight;
        font-size: $size-normal;
        line-height: 15px;
        border: solid 1px $dark-gray;
        background-color: $darkest-gray;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        cursor: pointer;
    }

    .sales-tool-dropdown-toggle {
    }

    .sales-tool-button-group {
        position: relative;
        display: inline-block;
        vertical-align: middle;

        & > .sales-tool-button {
            position: relative;
            float: left;
            border-left: none;
        }

        & > .sales-tool-button:first-child {
            border-left: solid 1px $dark-gray;
        }

        & > .sales-tool-dropdown-toggle {
            padding-right: 10px;
            padding-left: 10px;
        }

        & > div {
            display: inline-block;
            vertical-align: middle;
            cursor: pointer;
        }

        &.sales-tool-justified {
            width: 100%;

            .sales-tool-button {
                width: 100%;
                margin-right: -26px;
                padding-right: 16px;
                text-align: left;
                float: none;
            }

            .sales-tool-dropdown-toggle {
                width: 26px;
                margin-right: 0;
            }
        }
    }

    .sales-tool-scroll {
        height: 382px;
        overflow: auto;
        scrollbar-face-color: $gray;
        scrollbar-shadow-color: $gray;
        scrollbar-highlight-color: $gray;
        scrollbar-3dlight-color: $gray;
        scrollbar-darkshadow-color: $dark-gray;
        scrollbar-track-color: $dark-gray;
        scrollbar-arrow-color: $gray;

        &::-webkit-scrollbar {
            width: 12px;
            height: 12px;
        }

        &::-webkit-scrollbar-track {
            background: $dark-gray;
        }

        &::-webkit-scrollbar-thumb {
            background: $gray;
        }
    }

    .sales-tool-dropdown-menu {
        position: absolute;
        top: 100%;
        z-index: 99995;
        float: left;
        min-width: 220px;
        padding: 0;
        margin: 0;
        text-align: left;
        list-style: none;
        background-color: $darkest-gray;
        border: solid 1px $dark-gray;
        border-top: none;

        ul {
            padding: 0;
        }

        & > li, & > ul li {
            white-space: nowrap;
            border-top: solid 1px $dark-gray;
        }

        & > li > a, & > ul > li > a, & > li.sales-tool-dropdown-info {
            display: block;
            padding: 8px 10px;
            line-height: normal;
        }

        & > li > a, & > ul > li > a {
            cursor: pointer;
        }

        & > li > a:hover, & > ul > li > a:hover {
            color: $white;
            background-color: $dark-gray;
        }
    }

    .sales-tool-pull-right .sales-tool-dropdown-menu {
        right: 0;
    }
    /* Navbar */
    .sales-tool-navbar {
        min-height: 51px;
        position: relative;
        line-height: normal;

        & > .sales-tool-navbar-nav {
            margin: 0;
            list-style-type: none;
            -webkit-margin-before: 0;
            -webkit-margin-after: 0;
            -webkit-padding-start: 0;

            & > li {
                float: left;

                & > .sales-tool-button-group {
                    height: 50px;

                    & > .sales-tool-button {
                        border: none;
                        line-height: 34px;

                        &.sales-tool-dropdown-toggle {
                            border-left: solid 1px $dark-gray;
                        }
                    }
                }
            }

            &.sales-tool-pull-right > li {
                border-left: solid 1px $dark-gray;
            }
        }

        .sales-tool-navbar-header {
            width: 146px;
            margin: 10px;
            line-height: 30px;
        }

        .sales-tool-logo {
            height: 30px;
            background: no-repeat url('');
        }

        .sales-tool-search-result {
            position: absolute;
            top: 44px;
            left: 0;
            z-index: 99994;
            width: 480px;
            background-color: $dark-gray;
            border: solid 1px $dark-gray;

            tr {
                cursor: pointer;

                &:hover td {
                    color: $white;
                    background-color: $darkest-gray;
                }
            }
        }

        .sales-tool-account-icon {
            border-radius: 50%;
            text-align: center;
            line-height: 32px;
            font-size: 18px;
            width: 32px;
            height: 32px;
            margin: 9px 10px 5px;
            background-color: $dark-gray;
            color: $lighter-gray;
        }
    }
    /* Grid */
    .sales-tool-col-one-fourth {
        width: 25%;
        padding: 6px 10px;
        float: left;
    }

    .sales-tool-col-one-third {
        width: 33.33%;
        padding: 6px 10px;
        float: left;
    }

    .sales-tool-col-one-half {
        width: 50%;
        padding: 6px 10px;
        float: left;
    }

    .sales-tool-col-one-whole {
        padding: 6px 10px;
    }
    /* Icons */
    i {
        vertical-align: middle;
        display: inline-block;
    }

    i.sales-tool-caret {
        height: 5px;
        width: 9px;
        background: no-repeat url('');
    }

    i.sales-tool-order {
        width: 16px;
        height: 12px;
        height: $size-normal;
        vertical-align: text-top;
        margin-right: 4px;
        background: no-repeat url('');
    }

    i.sales-tool-email {
        width: 16px;
        height: 16px;
        margin: -2px;
        background: no-repeat url('');
    }

    i.sales-tool-print {
        width: 16px;
        height: 16px;
        margin: -2px;
        background: no-repeat url('');
    }

    i.sales-tool-close {
        width: 12px;
        height: 12px;
        background: no-repeat url('');
    }

    .sales-tool-list {
        tr td {
            cursor: pointer;
        }

        tr:hover td {
            color: #fff;
            background-color: $dark-gray;
        }
    }

    .sales-tool-badge {
        position:absolute;
        z-index: 99992;
        top: 2px;
        right: 2px;
        display:block;
        background-color: $green;
        border-radius:3px;
        padding: 0 4px;
        margin: 1px;
        line-height: normal;
        font-size: 12px;
        color: $black;
        font-weight: 700;
    }
}

#sales-tool-print {
    border: none;
    width: 0;
    height: 0;
    position: absolute;
    top: -10px;
}

#sales-tool-backdrop {
    position: absolute;
    z-index: 99998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.50);
}

#sales-tool-loader {
    position: absolute;
    z-index: 99999;
    left: 50%;
    top: 44px;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top-color: $green;
    -webkit-animation: spin 2s linear infinite;
    -moz-animation: spin 2s linear infinite;
    -o-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;

    &:before {
        content: "";
        position: absolute;
        top: 1px;
        left: 1px;
        right: 1px;
        bottom: 1px;
        border-radius: 50%;
        border: 6px solid transparent;
        border-top-color: $blue;
        -webkit-animation: spin 3s linear infinite;
        -moz-animation: spin 3s linear infinite;
        -o-animation: spin 3s linear infinite;
        animation: spin 3s linear infinite;
    }

    &:after {
        content: "";
        position: absolute;
        top: 7px;
        left: 7px;
        right: 7px;
        bottom: 7px;
        border-radius: 50%;
        border: 6px solid transparent;
        border-top-color: $purple;
        -webkit-animation: spin 1.5s linear infinite;
        -moz-animation: spin 1.5s linear infinite;
        -o-animation: spin 1.5s linear infinite;
        animation: spin 1.5s linear infinite;
    }
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0);
        -ms-transform: rotate(0);
        -moz-transform: rotate(0);
        -o-transform: rotate(0);
        transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@-moz-keyframes spin {
    0% {
        -webkit-transform: rotate(0);
        -ms-transform: rotate(0);
        -moz-transform: rotate(0);
        -o-transform: rotate(0);
        transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0);
        -ms-transform: rotate(0);
        -moz-transform: rotate(0);
        -o-transform: rotate(0);
        transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
